package com.rockwell.maze800.views;

import android.app.Activity;
import android.os.Bundle;
import android.util.Log;
import android.view.Window;
import android.view.WindowManager;

public class MainActivity extends Activity {
    private static final String  TAG = "MainActivity::Activity";
    private MazeCameraView 		 mazeCameraView;

    public MainActivity() {
        Log.i(TAG, "Instantiated new " + this.getClass());
    }

    /** Called when the activity is first created. */
    @Override
    public void onCreate(Bundle savedInstanceState) {
        Log.i(TAG, "called onCreate");
        super.onCreate(savedInstanceState);
        requestWindowFeature(Window.FEATURE_NO_TITLE);
        getWindow().addFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON);
        
        setContentView(R.layout.main_layout);
        mazeCameraView = (MazeCameraView) this.findViewById(R.id.maze_camera_view);
    }

    @Override
    public void onPause()
    {
        super.onPause();
        mazeCameraView.onDeactivated();
    }

    @Override
    public void onResume()
    {
        super.onResume();
        mazeCameraView.onActivated();
    }

    public void onDestroy() {
        super.onDestroy();
        mazeCameraView.onDeactivated();
    }
}
